package com.situ.report.controller;

import com.situ.report.service.GcserviceService;
import com.situ.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Gcservicecontroller{
    @Autowired
    GcserviceService gcserviceService;

    @RequestMapping("selectcst_customergc")
    public ResponseData querygc(int aaa){
        return ResponseData.ok().putDataValue("list", gcserviceService.querygc(aaa));
    }



    @RequestMapping("querycst_service")
    public ResponseData queryall(Integer years){
        System.out.println(years);
        return ResponseData.ok().putDataValue("cstservicelist", gcserviceService.queryservices(years));
    }

    @RequestMapping("querycst_serviceyear")
    public ResponseData queryyear(){
        return ResponseData.ok().putDataValue("year", gcserviceService.queryserviceyear());
    }
}
